import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/Login'

Vue.use(Router)

export default new Router({
  mode:"history",
  routes: [
    {
      path: '/',
      name: 'Login',
      component: ()=>import('@/components/Login')
    },
    {
      path: '/',
      name: 'Login',
      component: () => import('@/components/Login'),
    },
    {
      path:'/index',
      name:'Index',
      component:()=>import('@/components/Index'),
      children:[
        {
          path:'',
          name:'Welcome',
          component:()=>import('@/components/Welcome')
        },
        {
          path:'User',
          name:'User',
          component:()=>import('@/components/User')

        },
        {
          path:'Game',
          name:'Game',
          component:()=>import('@/components/Game')
        }
      ]
    },


  ]
})
